package com.ruoyi.web.controller.count;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.count.service.IPatientStatisticsService;
import com.ruoyi.count.domain.PatientAgeStatistics;

@RestController
@RequestMapping("/count/patient")
public class PatientStatisticsController extends BaseController {
    
    @Autowired
    private IPatientStatisticsService patientStatisticsService;

    @GetMapping("/age/statistics")
    public AjaxResult getAgeStatistics(String startDate, String endDate) {
        List<PatientAgeStatistics> list = patientStatisticsService.getAgeStatistics(startDate, endDate);
        return AjaxResult.success(list);
    }
} 